
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<div id="searchDiv" class="ibox " style="display: none;">
	<div class="ibox-title collapse-link" style="cursor: pointer;"
		title="展开/收起查询条件">

		<h5>查询条件</h5>
		<div class="ibox-tools"></div>

	</div>
	
	<form action="web/poAgreementHead/getPoHeadList" method="get">
	<div class="ibox-content m-b-sm border-bottom">
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="poName">合同名称</label>
					<input type="text" id="poName" name="poName" value="${param.poName}" class="form-control" autocomplete="off">
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="poHeadCode">合同编码</label>
					<input type="text" id="poHeadCode" name="poHeadCode" value="${param.poHeadCode}" class="form-control" autocomplete="off">
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="projectCode">合同单号</label>
					<input type="text" id="projectCode" name="projectCode" value="${param.projectCode}" class="form-control" autocomplete="off">
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label">签订日期</label>
					<div>
						<div class="input-group date" style="width: 50%;float: left">
							<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input id="startDate" name="startDate" type="text" class="form-control" value="${param.startDate}" autocomplete="off">
						</div>
						<div class="input-group date" style="width: 50%;float: left">
							<span style="line-height: 30px;">-</span><span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input id="startDate1" name="startDate1" type="text" class="form-control" value="${param.startDate1}" autocomplete="off">
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label">终止日期</label>
					<div>
						<div class="input-group date" style="width: 50%;float: left">
							<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input id="endDate" name="endDate" type="text" class="form-control" value="${param.endDate}" autocomplete="off">
						</div>
						<div class="input-group date" style="width: 50%;float: left">
							<span style="line-height: 30px;">-</span><span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input id="endDate1" name="endDate1" type="text" class="form-control" value="${param.endDate1}" autocomplete="off">
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="poType">审批通过日期</label>
					<div>
						<div class="input-group date" style="width: 50%;float: left">
							<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input id="signDate" name="signDate" type="text" class="form-control" value="${param.signDate}" autocomplete="off">
						</div>
						<div class="input-group date" style="width: 50%;float: left">
							<span style="line-height: 30px;">-</span><span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input id="signDate1" name="signDate1" type="text" class="form-control" value="${param.signDate1}" autocomplete="off">
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="orgCode">站点名称</label>
					<input type="text" id="orgCode" name="orgCode" value="${param.orgCode}" class="form-control" autocomplete="off">
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="staffCode">乙方名称</label>
					<select class="select2 form-control" id="staffCode" name="staffCode" autocomplete="off">
						<option value="" selected="selected">请选择...</option>
						<c:forEach items="${requestScope.vendorMap}" var="vendor">
							<option value="${vendor.key}">${vendor.value}</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="status">合同状态</label>
					<select class="select2 form-control" id="status" name="status">
						<option value="" selected="selected">请选择...</option>
						<c:forEach items="${requestScope.poStatusMap}" var="postatus">
							<option value="${postatus.key}">${postatus.value}</option>
						</c:forEach>
					</select>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="taxType">合同性质</label>
					<select class="select2 form-control" name="taxType" id="taxType" autocomplete="off">
						<option value="" selected="selected">请选择...</option>
						<c:forEach items="${requestScope.poQualeMap}" var="taxType">
							<option value="${taxType.key}">${taxType.value}</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="poType">合同类型</label>
					<select id="poType" name="poType" class="select2 form-control" autocomplete="off">
						<option value="" selected="selected">请选择...</option>
						<c:forEach items="${requestScope.poTypeMap}" var="poType">
							<option value="${poType.key}">${poType.value}</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="taxType">合同来源方式</label>
					<select class="select2 form-control" name="sourceMode" id="sourceMode" autocomplete="off">
						<option value="" selected="selected">请选择...</option>
						<c:forEach items="${requestScope.poSourceMap}" var="sourceMode">
							<option value="${sourceMode.key}">${sourceMode.value}</option>
						</c:forEach>
					</select>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="staffCode">归档日期</label>
					<div>
						<div class="input-group date" style="width: 50%;float: left">
							<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input id="archivedDate" name="archivedDate" type="text" class="form-control" value="${param.archivedDate}" autocomplete="off">
						</div>
						<div class="input-group date" style="width: 50%;float: left">
							<span style="line-height: 30px;">-</span><span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input id="archivedDate1" name="archivedDate1" type="text" class="form-control" value="${param.archivedDate1}" autocomplete="off">
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="control-label" for="poType">合同创建日期</label>
					<div>
						<div class="input-group date" style="width: 50%;float: left">
							<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input id="createdDate" name="createdDate" type="text" class="form-control" value="${param.createdDate}" autocomplete="off">
						</div>
						<div class="input-group date" style="width: 50%;float: left">
							<span style="line-height: 30px;">-</span><span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input id="createdDate1" name="createdDate1" type="text" class="form-control" value="${param.createdDate1}" autocomplete="off">
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12 text-right">
				<div class="form-group">
					<button type="submit" class="btn btn-w-m btn-primary">查询</button>
				</div>
			</div>
		</div>
	</div>
	
	<%-- 隐藏字段 --%>
	<input type="hidden" name="page" value="1">
	</form>
</div>

<!-- select2 -->
<script src="js/plugins/select2/select2.full.min.js"></script>

<script>
$(document).ready(function(){
	//设置状态默认值
	if("${param.status}"!=""){
		$("#status").val("${param.status}");
	}
	//设置poType默认值
	if("${param.poType}"!=""){
		$("#poType").val("${param.poType}");
	}
	//设置taxType默认值
	if("${param.taxType}"!=""){
		$("#taxType").val("${param.taxType}");
	}
	//设置乙方名称
	if("${param.staffCode}"!=""){
		$("#staffCode").val("${param.staffCode}");
	}
	//设置日期插件
	$('#startDate').datepicker({
		todayBtn : "linked",
		keyboardNavigation : true,
		forceParse : true,
		calendarWeeks : false,
		autoclose : true,
		format: 'yyyy-mm-dd',
		language: 'zh-CN',
	});

	$('#startDate1').datepicker({
		todayBtn : "linked",
		keyboardNavigation : true,
		forceParse : true,
		calendarWeeks : false,
		autoclose : true,
		format: 'yyyy-mm-dd',
		language: 'zh-CN',
	});
	$('#endDate').datepicker({
		todayBtn : "linked",
		keyboardNavigation : true,
		forceParse : true,
		calendarWeeks : false,
		autoclose : true,
		format: 'yyyy-mm-dd',
		language: 'zh-CN',
	});
	$('#endDate1').datepicker({
		todayBtn : "linked",
		keyboardNavigation : true,
		forceParse : true,
		calendarWeeks : false,
		autoclose : true,
		format: 'yyyy-mm-dd',
		language: 'zh-CN',
	});
	$('#signDate').datepicker({
		todayBtn : "linked",
		keyboardNavigation : true,
		forceParse : true,
		calendarWeeks : false,
		autoclose : true,
		format: 'yyyy-mm-dd',
		language: 'zh-CN',
	});
	$('#signDate1').datepicker({
		todayBtn : "linked",
		keyboardNavigation : true,
		forceParse : true,
		calendarWeeks : false,
		autoclose : true,
		format: 'yyyy-mm-dd',
		language: 'zh-CN',
	});
	$('#archivedDate').datepicker({
		todayBtn : "linked",
		keyboardNavigation : true,
		forceParse : true,
		calendarWeeks : false,
		autoclose : true,
		format: 'yyyy-mm-dd',
		language: 'zh-CN',
	});
	$('#archivedDate1').datepicker({
		todayBtn : "linked",
		keyboardNavigation : true,
		forceParse : true,
		calendarWeeks : false,
		autoclose : true,
		format: 'yyyy-mm-dd',
		language: 'zh-CN',
	});
	$('#createdDate').datepicker({
		todayBtn : "linked",
		keyboardNavigation : true,
		forceParse : true,
		calendarWeeks : false,
		autoclose : true,
		format: 'yyyy-mm-dd',
		language: 'zh-CN',
	});
	$('#createdDate1').datepicker({
		todayBtn : "linked",
		keyboardNavigation : true,
		forceParse : true,
		calendarWeeks : false,
		autoclose : true,
		format: 'yyyy-mm-dd',
		language: 'zh-CN',
	});
	//初始化select2
	$('.select2').select2({width: "100%"});
});
</script>
